package com.qpcy.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author DELL
 * @since 2024-10-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "hot_product")
public class HotProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增
     */
    @Id
    private Integer id;

    /**
     * 产品id
     */
    private Integer productId;

    /**
     * 图片
     */
    private String picture;

    /**
     * 排序
     */
    private Integer sort;

    @RelationOneToOne(selfField = "productId", targetField = "productId", targetTable = "product")
    private Product product;

}
